package com.exam.project.business.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.exam.framework.aspectj.lang.annotation.Excel;
import com.exam.framework.web.domain.BaseEntity;

/**
 * 用户答题对象 practice_record
 * 
 * @author qiuwenbing
 * @date 2025-04-03
 */
public class PracticeRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 学生的用户id */
    @Excel(name = "学生的用户id")
    private Long userId;

    /** 关联的题目id */
    @Excel(name = "关联的题目id")
    private Long questionId;

    /** 学生的答题内容 */
    @Excel(name = "学生的答题内容")
    private String answerContent;

    /** 学生答题是否正确，null表示未判题，true表示正确，false表示错误 */
    @Excel(name = "学生答题是否正确，null表示未判题，true表示正确，false表示错误")
    private Integer isCorrect;

    /** 学生是否标记该题目，true表示已标记，false表示未标记 */
    @Excel(name = "学生是否标记该题目，true表示已标记，false表示未标记")
    private Integer isMarked;

    /** 练习时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "练习时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date practiceTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setQuestionId(Long questionId) 
    {
        this.questionId = questionId;
    }

    public Long getQuestionId() 
    {
        return questionId;
    }
    public void setAnswerContent(String answerContent) 
    {
        this.answerContent = answerContent;
    }

    public String getAnswerContent() 
    {
        return answerContent;
    }
    public void setIsCorrect(Integer isCorrect) 
    {
        this.isCorrect = isCorrect;
    }

    public Integer getIsCorrect() 
    {
        return isCorrect;
    }
    public void setIsMarked(Integer isMarked) 
    {
        this.isMarked = isMarked;
    }

    public Integer getIsMarked() 
    {
        return isMarked;
    }
    public void setPracticeTime(Date practiceTime) 
    {
        this.practiceTime = practiceTime;
    }

    public Date getPracticeTime() 
    {
        return practiceTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("questionId", getQuestionId())
            .append("answerContent", getAnswerContent())
            .append("isCorrect", getIsCorrect())
            .append("isMarked", getIsMarked())
            .append("practiceTime", getPracticeTime())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
